package com.oliver.oliveraiagent.service;

import com.oliver.oliveraiagent.model.dto.user.UserLoginRequest;
import com.oliver.oliveraiagent.model.dto.user.UserRegisterRequest;
import com.oliver.oliveraiagent.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.oliver.oliveraiagent.model.vo.UserLoginVO;
import jakarta.servlet.http.HttpServletRequest;

/**
* @author snow
* @description 针对表【users】的数据库操作Service
* @createDate 2025-05-25 17:09:05
*/
public interface UserService extends IService<User> {

    /**
     * 判断是否登录成功
     *
     * @param loginRequest
     * @param request
     * @return
     */
    UserLoginVO login(UserLoginRequest loginRequest, HttpServletRequest request);

    void register(UserRegisterRequest registerRequest);

    /**
     * Md5加密
     * @param userPassword
     * @return
     */
    String getEncryptPassword(String userPassword);

    /**
     * 获取当前登录用户
     *
     * @param request
     * @return
     */
    User getLoginUser(HttpServletRequest request);
}
